<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name='viewport' content='width=device-width, initial-scale=1.0'>
        <title>Title</title>
    </head>
    <body>
        <div id='app'>
            <!-- 作用域插槽，在父组件调用子组件的组件时，想要使用 子组件的 变量， -->
            <child v-slot="aa">
                <h2>春天来了 ,我想说 ：{{aa.msg1}} </h2>

            </child>
        </div>
        <script src="../js/vue.js"></script>
        <script>
            let child={
                data(){
                    return{msg:"hello"}
                },
                template:`<div>
                <slot :msg1="msg"></slot>
                </div>`
            }
            let vm = new Vue({
                el: '#app',
                data: {},
                components: {
                    child
                }
            });
        </script>
    </body>
</html>